package com.wx.fresh.custom.controller;

import com.wx.fresh.common.util.CommonResult;
import com.wx.fresh.custom.vo.userVo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * custom订单模块controller
 *
 * @author salthe
 * @date 2022/4/21
 */
@Controller
@Api(tags = "custom订单模块", value = "custom订单模块")
@RequestMapping("/customOrder")
public class CustomerOrderController {
    @ApiOperation(value = "创建订单", response = CustomCreateOrderOutVO.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "products", value = "商品列表", required = true, paramType = "form"),
            @ApiImplicitParam(name = "userId", value = "用户id", required = true, paramType = "form")
    })
    @GetMapping("/createOrder")
    public CommonResult<CustomCreateOrderOutVO> createOrder(CustomCreateOrderVO order) {
        return null;
    }

    @ApiOperation(value = "支付", response = CustomDefrayOutVO.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderId", value = "订单id", required = true, paramType = "form")
    })
    @GetMapping("/defray")
    public CommonResult<CustomDefrayOutVO> defray(CustomDefrayVO defray) {
        return null;
    }

    @ApiOperation(value = "二维码", response = CustomQRCodeOutVO.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderId", value = "订单id", required = true, paramType = "form")
    })
    @GetMapping("/QRCode")
    public CommonResult<CustomQRCodeOutVO> QRCode(CustomQRCodeVO qrcode) {
        return null;
    }

    @ApiOperation(value = "获取所有订单", response = CustomGetOrderOutVO.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户id", required = true, paramType = "form"),
            @ApiImplicitParam(name = "state", value = "订单状态", required = true, paramType = "form")
    })
    @GetMapping("/getAllOrder")
    public CommonResult<CustomGetOrderOutVO> getAllOrder(CustomGetAllOrderVO order) {
        return null;
    }

    @ApiOperation(value = "获取所有订单", response = CustomCreateOrderOutVO.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderId", value = "订单id", required = true, paramType = "form")
    })
    @GetMapping("/getOrder")
    public CommonResult<CustomCreateOrderOutVO> getOrder(CustomGetOrderVO order) {
        return null;
    }
}
